<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>速度中国工时系统</title>
    <link rel="stylesheet" href="/plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="/build/css/css/font-awesome.min.css">
    <link rel="stylesheet" href="/build/css/app.css" media="all">
</head>
<style>
  .logo-tit {
        line-height: 50px;
        color: #fff;
        font-size: 18px;
    }


  .layui-nav-tree .layui-nav-child dd.layui-this, .layui-nav-tree .layui-nav-child dd.layui-this a, .layui-nav-tree .layui-this, .layui-nav-tree .layui-this>a, .layui-nav-tree .layui-this>a:hover{
      background-color: #466482;!important;
      color: #fff;
  }
  span{
      margin-left: 5px;
  }
  .layui-tab-card>.layui-tab-title .layui-this{
      background-color: #f2f2f2;
      border-width: 1px;
      border-bottom-color: #f2f2f2;
      border-top: 3px solid #aaaaaa;
  }
  .layui-tab-card>.layui-tab-title{
      background-color: #fff;
  }
  .layui-tab-card>.layui-tab-title .layui-this:after{
      border-bottom-color: transparent;
      height: 38px;
  }
  .layui-tab-card>.layui-tab-title{
      margin-top: -1px;
  }
</style>
<body style="background-color: #f2f2f2;">
<div class="layui-layout layui-layout-admin kit-layout-admin">
    <div class="layui-header" style="background-color: #3281ce">
        <div class="layui-logo">
            <a href="/logout">
            <img src="/images/portal-logo.png" height="70%">
            </a>
        </div>
        <ul class="layui-layout-left">
            <li class="logo-tit">速度中国工时系统</li>
        </ul>

        <ul class="layui-nav layui-layout-right kit-nav" kit-navbar>
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="/images/head-img.png" class="layui-nav-img"><span th:text="${user.getUserName()}"></span>
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:;" kit-target
                           data-options="{url:'/system/user/me',icon:'&#xe658;',title:'个人信息',id:'10'}">基本资料</a>
                    </dd>
                    <dd><a href="javascript:;" kit-target
                           data-options="{url:'/system/user/password',icon:'&#xe658;',title:'修改密码',id:'11'}">修改密码</a>
                    </dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="/logout">
                    <i class="fa fa-clock-o" aria-hidden="true"></i> 注销</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black kit-side">
        <div class="layui-side-scroll">
            <div class="kit-side-fold"><i class="fa fa-navicon" aria-hidden="true"></i></div>
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="kitNavbar" kit-navbar>
                <li class="layui-nav-item layui-this" >
                    <a href="javascript:;" data-url="/main" kit-target data-id='-1'><i
                            class="fa fa-home"  aria-hidden="true"></i><span style="margin-left: 0px;"> 首页</span></a>
                </li>

                <li class="layui-nav-item " th:each="resource : ${resources}">
                    <a href="javascript:;"><i th:attr="class=${resource.getIcon()}"  aria-hidden="true"></i><span th:text="${resource.resourceName}"></span></a>
                    <dl class="layui-nav-child" >
                        <dd th:each="cresource : ${resource.children}">
                            <a style="margin-left: 20px;" href="javascript:;"  th:attr="data-url=${cresource.getUrl()},data-title=${cresource.getResourceName()},data-id=${cresource.getId()}"  data-icon="&#xe658;"  kit-target><i class="fa fa-circle-o"></i><span th:text="${cresource.resourceName}"> </span></a>
                        </dd>

                    </dl>
                </li>

            </ul>
        </div>
    </div>
    <div class="layui-body" id="container">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">主体内容加载中,请稍等...</div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        Copyright © 2018 SpeedChina. All right reserved.

    </div>
</div>

<script src="/js/jquery.min.js"></script>
<script src="/plugins/layui/layui.js"></script>
<script>
    var message;
    layui.config({
        base: 'build/js/'
    }).use(['app', 'message'], function () {
        var app = layui.app,
            $ = layui.jquery,
            layer = layui.layer;
        //将message设置为全局以便子页面调用
        message = layui.message;
        //主入口
        app.set({
            type: 'iframe'
        }).init();
        $('#pay').on('click', function () {
            layer.open({
                title: false,
                type: 1,
                content: '<img src="/build/images/pay.png" />',
                area: ['500px', '250px'],
                shadeClose: true,

            });
        });
    });
</script>

</body>

</html>